import java.util.ArrayList;

public class Main {
    private ArrayList<Student> slist = new ArrayList<>();

    public void addStudent(Student s) {
        this.slist.add(s);
    }

    public void showStudent() {
        for (Student s : slist) {
            System.out.println(s);
        }
    }

    public static void main(String[] args) {
        Main t = new Main();
        t.addStudent(new Student("2016001", "rose", 18));
        t.addStudent(new Student("2016002", "hunifu", 19));
        t.addStudent(new Student("2016003", "britsh", 20));
        t.addStudent(new Student("2016004", "sunni", 17));
        t.showStudent();
    }
}

class Student {
    private String id;    // 学号
    private String name;  // 姓名
    private int age;      // 年龄

    // 构造方法
    public Student(String id, String name, int age) {
        this.id = id;
        this.name = name;
        this.age = age;
    }

    // 重写 toString 方法，用于输出学生信息
    @Override
    public String toString() {
        return id + " " + name + " " + age;
    }
}